package com.mxpio.erp.common.workshop.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.mxpio.erp.common.jpa.model.OrderLine;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_WORKSHOP_MO_ITEM")
@Schema(description="订单估计材料行")
public class ManufactureOrderItem extends OrderLine {

	private static final long serialVersionUID = 1L;
	
	/*
	 * 1、推式：先发料后生产
	 * 2、装配拉式：装配件完工扣减
	 * 3、工序拉式：工序完工扣减（暂不支持）
	 * 4、供应方：物料倒冲扣减\MRP计划不考虑
	 * 5、大量式：物料倒冲扣减\MRP计划不考虑
	 */
	@Column(name = "FEEDING_MODE_")
	@Schema(description = "供料方式")
	@Dict(dicCode = "ERP_TECH_FEEDING_MODE")
	private String feedingMode;
	
	@Column(name = "WH_CODE_")
	@Schema(description = "仓库编号")
	private String whCode;
	
	@Transient
	@Schema(description = "领料数量")
	private BigDecimal pickingQuantity;
	
	@Transient
	@Schema(description = "退料数量")
	private BigDecimal returnedQuantity;
	
	@Transient
	@Schema(description = "报废数量")
	private BigDecimal scrapQuantity;
	
	@Transient
	@Schema(description = "补料数量")
	private BigDecimal replenishQuantity;
	
}
